package top.goldenyear.porpoise.framework.common.enums;

import top.goldenyear.porpoise.framework.common.model.IntArrayValuable;
import java.util.Arrays;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 通用状态枚举
 *
 * @author Airhead
 */
@Getter
@AllArgsConstructor
public enum CommonStatus implements IntArrayValuable {

  /** */
  ENABLE(1, "开启"),
  DISABLE(0, "关闭");

  public static final int[] ARRAYS =
      Arrays.stream(values()).mapToInt(CommonStatus::getStatus).toArray();

  /** 状态值 */
  private final Integer status;

  /** 状态名 */
  private final String name;

  @Override
  public int[] array() {
    return ARRAYS;
  }
}
